#include "SceneLeaf.h"

#include "BoundingBox.h"
#include "Face.h"

//////////////////////////////////////////////////
//SceneLeaf
//////////////////////////////////////////////////

//------------------------------------------------

SceneLeaf::SceneLeaf(BoundingBox* i_bounding_box)
: m_bounding_box(i_bounding_box)
, m_children(new std::list<SceneLeaf*>())
, m_data_faces(new std::list<Face*>())
  {
  }

//------------------------------------------------

SceneLeaf::~SceneLeaf(void)
  {
  m_children->empty();
  delete m_children;

  m_data_faces->empty();
  delete m_data_faces;

  delete m_bounding_box;
  }

//------------------------------------------------

void SceneLeaf::AddChild(SceneLeaf* i_child)
  {
  m_children->push_back(i_child);
  }

//------------------------------------------------

void SceneLeaf::AddDataFace(Face* i_face)
  {
  m_data_faces->push_back(i_face);
  }

//------------------------------------------------

std::list<SceneLeaf*>* SceneLeaf::GetChildren() const
  {
  return m_children;
  }

//------------------------------------------------

std::list<Face*>* SceneLeaf::GetDataFaces() const
  {
  return m_data_faces;
  }

//------------------------------------------------

BoundingBox* SceneLeaf::GetBoundingBox() const
  {
  return m_bounding_box;
  }

//------------------------------------------------

//////////////////////////////////////////////////